<template>
  <link rel="stylesheet" href="/assets/css/my.css">

  <div class="usercenter">
    <div class="header">
      <div class="header_title">
        <div class="title_avatar">
          <img :src="business.avatar_text" />
        </div>
        <div class="title_content">
          <div class="content_text">{{ business.nickname }}</div>
          <div class="content_sm">{{ business.createtime_text }}</div>
        </div>
      </div>
      <div class="operate">
        <div class="text-sm">
          <span class="text-bold">0</span>
          收藏夹
        </div>
        <div class="text-sm">
          <span class="text-bold">0</span>
          关注店铺
        </div>
        <div class="text-sm">
          <span class="text-bold">0</span>
          足迹
        </div>
        <div class="text-sm">
          <span class="text-bold">0</span>
          全部订单
        </div>
      </div>
    </div>
    <div class="userorder">
      <div class="order_project">
        <div class="item">
          <a href="retail.html" class="item">
            <div class="img"> <img src="/assets/images/retail1.png" alt=""></div>
            分销信息
          </a>
        </div>
        <div class="item">
          <a href="retailmember.html" class="item">
            <div class="img"> <img src="/assets/images/retail2.png" alt=""></div>
            分销会员
          </a>
        </div>
        <div class="item">
          <a href="kickback.html" class="item">
            <div class="img"> <img src="/assets/images/retail3.png" alt=""></div>
            分销佣金
          </a>
        </div>
        <div class="item">
          <a href="mycoupon.html" class="item">
            <div class="img"> <img src="/assets/images/coupon.png" alt=""></div>
            优惠列表
          </a>
        </div>
        <div class="item solid-left">
          <a href="deposit.html" class="item">
            <div class="img"> <img src="/assets/images/recharge2.png" alt=""></div>
            充值中心
          </a>
        </div>
      </div>
    </div>
    <div class="usertool">
      <div class="list">
        <div class="item">
          <router-link to="/business/profile">
            <div class="img">
              <img src="/assets/images/profile.png" alt="">
            </div>
            基本资料
          </router-link>
        </div>
        <div class="item">
          <router-link to="/order/index">
            <div class="img">
              <img src="/assets/images/recharge2.png" alt="">
            </div>
            我的订单
          </router-link>
        </div>
        <div class="item">
          <a href="order.html">
            <div class="img"> <img src="/assets/images/pingtuan.png" alt=""></div>
            拼团订单
          </a>
        </div>
        <div class="item">
          <router-link to="/address/index">
            <div class="img"> <img src="/assets/images/address.png" alt=""></div>
            收货地址
          </router-link>
        </div>
        <div class="item">
          <a href="email.html">
            <div class="img"> <img src="/assets/images/email.png" alt=""></div>
            邮箱认证
          </a>
        </div>
        <div class="item">
          <a href="record.html">
            <div class="img"> <img src="/assets/images/consume.png" alt=""></div>
            消费记录
          </a>
        </div>
        <div class="item">
          <a href="record.html">
            <div class="img"> <img src="/assets/images/recharge1.png" alt=""></div>
            充值记录
          </a>
        </div>
        <div class="item">
          <a href="javascript:void(0)" @click="logout">
            <div class="img">
              <img src="/assets/images/returns.png" alt=""></div>
            退出登录
          </a>
        </div>
      </div>
    </div>
    <div class="usertool">
      <ul class="proul">
        <li>
          <a href="detail.html"><img src="/assets/images/HWmate60.jpg"/></a>
          <a href="detail.html"><p class="tit">华为mate60</p></a>
          <div class="price">
            <p>￥6999</p>
          </div>
        </li>
        <li>
          <a href="detail.html"><img src="/assets/images/iphone12.jpg"/></a>
          <a href="detail.html"><p class="tit">苹果12</p></a>
          <div class="price">
            <p>￥5999</p>
          </div>
        </li>
        <li>
          <a href="detail.html"><img src="/assets/images/x3.jpg"/></a>
          <a href="detail.html"><p class="tit">华为X3</p></a>
          <div class="price">
            <p>￥13998</p>
          </div>
        </li>
        <li>
          <a href="detail.html"><img src="/assets/images/x3.jpg"/></a>
          <a href="detail.html"><p class="tit">华为X3</p></a>
          <div class="price">
            <p>￥13998</p>
          </div>
        </li>
      </ul>
    </div>
    <div class="h54"></div>
    <div class="clear"></div>
  </div>

  <tabbar />
</template>

<script  setup>
  import tabbar from '@/components/common/tabbar.vue'

  //获取this对象
  const { proxy } = getCurrentInstance()

  console.log(proxy)

  let business = proxy.$business

  let logout = () => {
      proxy.$confirm({
        message:'是否确认退出',
      }).then(() => { //确认
        // 删除cookie，跳转
        proxy.$cookies.remove('business')
        proxy.$cookies.remove('redirect')

        // 退出到登陆界面
        proxy.$router.push('/business/login')
        return
      }).catch(() => {

      })
    }
</script>
